/***************************************************************************
 *   Copyright (C) 2007 by saa   *
 *   root@saa   *
 ***************************************************************************/

#ifndef UTILS_H
#define UTILS_H

#include <list>

#include <QPair>
#include <QStringList>
#include <QHostInfo>

std::list<unsigned long> cidr2hosts(const unsigned long network, const unsigned int mask);
bool checkForIP( const QString & ipAddress );
QPair<QString,QString> checkForIPRange( const QString & target); // check for CIDR, return network and size
QStringList checkTargetList(const QStringList & targetList); // check and return list of IP for list of host name, CIDR, IP
QStringList checkTarget(const QString & target); // check and return list of IP for host name, CIDR, IP
QStringList checkTargetListByHostName(const QStringList & targetList); // convert each IP in list to name, adds new IP to that name to list

#endif
